package com.cisdi.analysis.service.util;

import org.supercsv.cellprocessor.constraint.DMinMax;
import org.supercsv.cellprocessor.constraint.NotNull;
import org.supercsv.cellprocessor.ift.CellProcessor;

/**
 * @author liujunnan
 * @date 2018/5/23
 */
public class ProcessorUtil {
    public static CellProcessor[] getProcessors() {
        final CellProcessor[] processors = new CellProcessor[]{
                new DMinMax(-DMinMax.MAX_DOUBLE, DMinMax.MAX_DOUBLE),
                new DMinMax(-DMinMax.MAX_DOUBLE, DMinMax.MAX_DOUBLE),
                new DMinMax(-DMinMax.MAX_DOUBLE, DMinMax.MAX_DOUBLE),
                new DMinMax(-DMinMax.MAX_DOUBLE, DMinMax.MAX_DOUBLE),
                new DMinMax(-DMinMax.MAX_DOUBLE, DMinMax.MAX_DOUBLE),
                new DMinMax(-DMinMax.MAX_DOUBLE, DMinMax.MAX_DOUBLE),
                new DMinMax(-DMinMax.MAX_DOUBLE, DMinMax.MAX_DOUBLE),
                new DMinMax(-DMinMax.MAX_DOUBLE, DMinMax.MAX_DOUBLE),
                new DMinMax(-DMinMax.MAX_DOUBLE, DMinMax.MAX_DOUBLE),
                new DMinMax(-DMinMax.MAX_DOUBLE, DMinMax.MAX_DOUBLE),
                new DMinMax(-DMinMax.MAX_DOUBLE, DMinMax.MAX_DOUBLE),
                new DMinMax(-DMinMax.MAX_DOUBLE, DMinMax.MAX_DOUBLE),
                new NotNull()
        };
        return processors;
    }

    public static CellProcessor[] getOneProcessors() {
        final CellProcessor[] processors = new CellProcessor[]{
                new NotNull(),
                new NotNull(),
                new NotNull(),
                new NotNull(),
                new NotNull(),
                new NotNull(),
                new NotNull(),
                new NotNull(),
                new NotNull(),
                new NotNull(),
                new NotNull(),
                new NotNull()
        };
        return processors;
    }
}
